﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace Nanohope_v1._0
{
    class Game : GeneralCanvas
    {
        List<Objects> objects;
        Character character;
        

        public Game()
        {
            objects = new List<Objects>();
            objects.Add(new Ground(new Vector2(-300, 450), new Vector2(1200, 200)));

            character = new Character();
        }

        public override void gameUpdate(GameTime gameTime)
        {

            character.Update(gameTime);
            character.CheckCollision(objects);
        }

        public override void onDraw(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch)
        {
            for (int i = 0; i < objects.Count; i++)
            {
                objects[i].onDraw(spriteBatch);
            }
            character.Draw(spriteBatch);
        }

        protected override void checkKeys(GameTime gameTime)
        {

        }
    }
}